#include "setsplitmode.h"
#include "ProtocalIdentifier.h"
#include "NetworkCommonFunction.h"

SetSplitMode::SetSplitMode(SplitMode splitMode):
		SenderCommand(GetProtocalIdentifier("SetSplitMode"))
		,m_SplitMode(splitMode)
{
}

void SetSplitMode::constructCommandData(QByteArray &commandData)
{
	int commandCode = m_CommandType;
	int splitMode = m_SplitMode;
	int commandLength = sizeof(splitMode);

	commandData.append(FBtoNetworkCharP(commandCode), sizeof(commandCode));
	commandData.append(FBtoNetworkCharP(commandLength), sizeof(commandLength));
	commandData.append(FBtoNetworkCharP(splitMode), sizeof(splitMode));
}
